import javax.imageio.ImageIO;
import java.awt.*;
import java.io.File;
import java.io.IOException;

public class CheckerBoard {
    protected static Image back_img;

    protected static int x = 0;
    protected static int y = 0;

    static {
        try {
            //加载背景
            back_img = ImageIO.read(new File("src/img/棋盘2.png"));
        } catch (IOException e) {
            e.printStackTrace();
            System.out.println("背景图片加载失败！");
        }
    }

    public void paintSelf(Graphics g){
        g.drawImage(back_img, x, y, null);
    }


}